//
//  HomeDetail.m
//  ChampoinPeso
//
//  Created by mac on 2025/2/16.
//

#import "HomeDetail.h"
#import "Step.h"

@interface HomeDetail ()
@property(nonatomic,strong)UIScrollView *scrollView;
@property (nonatomic,strong)UIView *scrollContentView;
@property (nonatomic,strong)UIImageView *bg;
@property (nonatomic,strong)UIButton *step1;
@property (nonatomic,strong)UIButton *step2;
@property (nonatomic,strong)UIButton *step3;
@end

@implementation HomeDetail
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
//    [self getSource];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navtitleText = @"Loan guide";
    UIScrollView *scroll = [[UIScrollView alloc]initWithFrame:CGRectZero];
    [self.view addSubview:scroll];
    [scroll mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.mas_offset(0);
    }];
    [self navUI];
    self.navView.backgroundColor = UIColor.clearColor;
    _scrollView = scroll;
    [_scrollView addSubview:self.scrollContentView];
    [self.scrollContentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(_scrollView);
        make.width.mas_equalTo(SCREEN_WIDTH);
    }];
//    941
    [_scrollContentView addSubview:self.bg];
    [_bg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_offset(0);
        make.height.mas_offset(KWidth(941));
        make.top.mas_offset(-64);
    }];
    [_scrollContentView addSubview:self.step1];
    [_step1 mas_makeConstraints:^(MASConstraintMaker *make) {
//       294
        make.top.mas_offset(KWidth(244));
        make.centerX.mas_equalTo(_scrollContentView);
        make.height.mas_equalTo(KWidth(125));
        make.width.mas_equalTo(SCREEN_WIDTH-60);
    }];
    [_scrollContentView addSubview:self.step2];
    [_step2 mas_makeConstraints:^(MASConstraintMaker *make) {
//       294
        make.top.equalTo(_step1.mas_bottom).offset(120);
        make.centerX.mas_equalTo(_scrollContentView);
        make.height.mas_equalTo(KWidth(115));
        make.width.mas_equalTo(SCREEN_WIDTH-60);
    }];
    [_scrollContentView addSubview:self.step3];
    [_step3 mas_makeConstraints:^(MASConstraintMaker *make) {
//       294
        make.top.equalTo(_step2.mas_bottom).offset(120);
        make.centerX.mas_equalTo(_scrollContentView);
        make.height.mas_equalTo(KWidth(105));
        make.width.mas_equalTo(SCREEN_WIDTH-60);
    }];
    [_step1 addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside];
}
//cham/stranded
-(void)getSource
{
//    [DataFrameMove frameMoverForPost:@"/cham/neck" MoverPost:YES frameParm:@{@"gossip":_pid} finish:^(id  _Nonnull info) {
//        if ([info[@"gardening"] isEqualToString:@"0"]) {
//            
//        }else{
//        }
//    }];

}
-(void)test{
//    Step *vc = [Step new];
//    [self.navigationController pushViewController:vc animated:YES];
}

-(UIImageView *)bg
{
    if(!_bg){
        _bg = [UIImageView new];
        _bg.image = [UIImage imageNamed:@"DBG"];
        _bg.contentMode = UIViewContentModeScaleToFill;
    }
    return _bg;
}
-(UIView *)scrollContentView{
    if (!_scrollContentView) {
        _scrollContentView = [UIView new];
    }
    return _scrollContentView;
}
-(UIButton *)step1
{
    if (!_step1) {
        _step1 = [UIButton new];
    }
    return _step1;
}
-(UIButton *)step2
{
    if (!_step2) {
        _step2 = [UIButton new];
    }
    return _step2;
}
-(UIButton *)step3
{
    if (!_step3) {
        _step3 = [UIButton new];
    }
    return _step3;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
